From 0baea96ec6d50591db7f58f6329f9023b2243297 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 30 Apr 2004 04:21:42 +0000 Subject: [PATCH] Make sure the static string is long enough. (#136323, Morten Welinder) Fri Apr 30 00:19:11 2004 Matthias Clasen * xdgmimemagic.c (_xdg_mime_magic_read_a_number): Make sure the static string is long enough. (#136323, Morten Welinder) --- gtk/xdgmime/ChangeLog | 5 +++++ gtk/xdgmime/xdgmimemagic.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gtk/xdgmime/ChangeLog b/gtk/xdgmime/ChangeLog index 61a14565b1..7ac489eaf3 100644 --- a/gtk/xdgmime/ChangeLog +++ b/gtk/xdgmime/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 30 00:19:11 2004 Matthias Clasen + + * xdgmimemagic.c (_xdg_mime_magic_read_a_number): Make sure + the static string is long enough. (#136323, Morten Welinder) + 2004-03-12 Morten Welinder * *.c: Make sure to include (#137001) diff --git a/gtk/xdgmime/xdgmimemagic.c b/gtk/xdgmime/xdgmimemagic.c index f368e40834..1a6e6b9001 100644 --- a/gtk/xdgmime/xdgmimemagic.c +++ b/gtk/xdgmime/xdgmimemagic.c @@ -196,7 +196,7 @@ _xdg_mime_magic_read_a_number (FILE *magic_file, { /* LONG_MAX is about 20 characters on my system */ #define MAX_NUMBER_SIZE 30 - char number_string[MAX_NUMBER_SIZE]; + char number_string[MAX_NUMBER_SIZE + 1]; int pos = 0; int c; long retval = -1; -- 2.30.2